home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / rbbs_pc / mapl0301.zip / XPORTMSG.BAS < prev    next >
BASIC Source File  |  1993-03-01  |  2KB  |  56 lines

  1. ' $linesize:132
  2. ' $title: ' SUB for Maple Street Version of RBBS-PC to Xport a message'
  3. ' $INCLUDE: 'RBBS-VAR.MOD'
  4. '
  5. ' $SUBTITLE: 'MsgXport - Xport Message to file'
  6. ' $PAGE
  7. '
  8. '  SUBPROGRAM NAME    -- XportMsg
  9. '
  10. '  INPUT PARAMETERS   --     PARAMETER  ???                 MEANING ???
  11. '
  12. '  OUTPUT PARAMETERS  --  ???
  13. '
  14. '  SUBPROGRAM PURPOSE --  Create a XportMessage file
  15. '
  16. 10    SUB MsgXport (Mto$,Mfro$,SUbj$,CurMess,PNumRecs,ForPrintRec) STATIC 
  17.        ForPrintRe$="   Re:    "+SUbj$
  18.        ForPrintFrom$="   From:  "+Mfro$
  19.        ForPrintTo$="   To:    "+Mto$
  20.        ForPrintNum$="Message #"+Str$(CurMess) + "          Xported from: " +ZConfName$
  21.  
  22.     ForPrintRec=ZMsgPtr(ZMsgDimIndex,1) + ZNumHeaders - 1  'RS Xport
  23.  
  24. 15  IF ZSysop = ZTrue THEN
  25.         ZOutTxt$ = "Xport to What File " + ZPressEnter$
  26.          ZSubParm = 1
  27.           CALL TGet
  28.            IF ZUserIn$ = "" THEN _
  29.              EXIT SUB
  30.               ToPrint$ = ZUserIn$
  31.                CALL AllCaps (ToPrint$)
  32.               Call Findit(ToPrint$)
  33.          If ZOK Then Call OpenWorkA (ToPrint$) Else CALL OpenOutW(ToPrint$)
  34.           PRINT #2,ForPrintNum$
  35.           PRINT #2,string$(72,"~")
  36.           PRINT #2,ForPrintFrom$
  37.           PRINT #2,ForPrintTo$
  38.           PRINT #2,ForPrintRe$
  39.           PRINT #2,string$(72,"~")
  40.           POut$=""
  41.           FOR PrintLoop= ForPrintRec+1 to ForPrintRec+PNumRecs-1 
  42.             GET 1,PrintLoop
  43.              FOR Loop1 = 1 to LEN(ZMsgRec$)
  44.               IF MID$(ZMsgRec$,Loop1,1) <> CHR$(227) THEN
  45.                  POut$=POut$+MID$(ZMsgRec$,Loop1,1)
  46.                ELSE
  47.                  PRINT #2,POut$
  48.                  POut$=""
  49.               END IF
  50.             NEXT Loop1
  51.           NEXT PrintLoop
  52.          PRINT #2,ZCRLF$
  53.         close #2
  54.      END IF
  55. End Sub
  56.